/**
 * 底部导航组件类型定义
 * 定义了所有相关的接口和类型
 */

// 弹窗类型枚举
export type DialogType = 'usage' | 'payment' | 'friendLinks' | 'about' | null

// 友情链接类型定义
export interface FriendLink {
  icon2: string
  title2: string
  link2: string
  desc2: string
}

// 外部链接项接口
export interface AttachmentLink {
  id: string
  title: string
  href: string
  target?: '_blank' | '_self'
  rel?: string
}

// 操作按钮项接口
export interface ActionButton {
  id: string
  title: string
  type: 'dialog' | 'link'
  dialogType?: DialogType
  href?: string
  target?: '_blank' | '_self'
  rel?: string
  onClick?: () => void
}

// 底部导航状态接口
export interface BottomNavigationState {
  activeDialog: DialogType
  isLoading: boolean
  lastInteraction: string | null
}

// 底部导航操作接口
export interface BottomNavigationActions {
  openDialog: (dialogType: Exclude<DialogType, null>) => void
  closeDialog: () => void
  setLoading: (loading: boolean) => void
  trackInteraction: (action: string, metadata?: Record<string, any>) => void
}

// 弹窗内容接口
export interface DialogContent {
  title: string
  width?: number
  height?: number
  content: React.ReactNode
}

// 用户设备能力接口
export interface DeviceCapabilities {
  supportsDialog: boolean
  supportsHover: boolean
  prefersReducedMotion: boolean
  connectionSpeed: string
}

// 监控事件接口
export interface TrackingEvent {
  action: string
  target: string
  timestamp: number
  metadata?: Record<string, any>
}

// 安全链接检查结果接口
export interface LinkSecurityResult {
  isSecure: boolean
  isTrusted: boolean
  warnings: string[]
} 